Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return approval state in API response #62

Merged
merged 1 commit into from
Jul 1, 2024
Merged

Conversation

malberts
Copy link
Contributor

@malberts malberts commented Jul 1, 2024

For #54

Also needed to show the new approval details on a page without refresh.

@malberts malberts marked this pull request as draft July 1, 2024 00:32
@malberts malberts marked this pull request as ready for review July 1, 2024 09:41
@JeroenDeDauw
Copy link
Member

"Approval state" is a domain concept, and it's not what you are returning. -2 because of poor PR title ;)

@JeroenDeDauw
Copy link
Member

Oh, you are returning it. Nvm, I'm -2'ing my previous comment instead.

@JeroenDeDauw JeroenDeDauw merged commit c8a3648 into master Jul 1, 2024
14 checks passed
@JeroenDeDauw JeroenDeDauw deleted the api-response branch July 1, 2024 11:37

return $this->getResponseFactory()->createJson( [
'approvalTimestamp' => $state->approvalTimestamp,
'approver' => $this->getUserNameFromUserId( $state->approverId ),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should return UserRealName and not the username since I am actually using user_real_name from user table and if the real name doesn't exist then perhaps maybe username. @malberts @JeroenDeDauw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants